package com.springboot.demo.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 配置文件
 *
 * @author supu
 * @create 2018-12-17 16:13
 **/
@Data
@Component
@ConfigurationProperties
@PropertySource(value="classpath:config/test.properties")
public class MyConfig {
    @Value("${test.host}")
    private String host;
}
